package com.llho.core.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Product implements Serializable{
	private Integer id;
	private String name;
	private Long price;
	private String description;
	private List<Image> images = new ArrayList<Image>();
	private Catalog catalog;
	
	public Product(){}
	
	public Product(String name, Long price, String description,
			List<Image> images, Catalog catalog) {
		super();
		this.name = name;
		this.price = price;
		this.description = description;
		this.images = images;
		this.catalog = catalog;
	}

	//
	public void addImage(Image image){
		image.setProduct(this);
		this.images.add(image);
	}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getPrice() {
		return price;
	}
	public void setPrice(Long price) {
		this.price = price;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public List<Image> getImages() {
		return images;
	}
	public void setImages(List<Image> images) {
		this.images = images;
	}
	public Catalog getCatalog() {
		return catalog;
	}
	public void setCatalog(Catalog catalog) {
		this.catalog = catalog;
	}
}
